<?php
defined('_JEXEC') or die('Restricted access');
$orders = $this->orders;
?>
<div class="main-content clear-fix" id="shopcart-page">
    <div class="content-left">						
        <div id="order-list-2">
            <!-- 
            <ul>
                <li><a class="activeCate" href="my-profile.php">Mine profil</a></li>						
                <li><a href="profile.php">Profil &amp; Betaling</a></li>
            </ul>
             -->
        </div>	
    </div>
    
    <div class="content-right" id="order-right">
        <div class="heading">
            <h2>Oversigt</h2>
        </div>
        <?php foreach($orders as $order){?>
        <div class="overview-div">
            <div class="eachOverview">
                <p class="eachOv-1">Fakturanr: <?php echo sprintf("%06d", $order->order_id); ?></p>
                <p class="eachOv-2">Dato: <?php echo date("d.m.Y", $order->order_date);?></p>
                <div class="eachOv-view-wrapper clear-fix">
                <a class="eachOv-view" data-reveal-id="overview-<?php echo $order->order_id;?>">View</a><?php if($order->order_status) echo '<p>BETALT!</p>';?>
                </div>
                <div id="overview-<?php echo $order->order_id;?>" class="reveal-modal overview-modal-div">
                    <iframe src="index.php?option=com_ecommerce&view=orders&layout=detail&tmpl=component&order_id=<?php echo $order->order_id?>" style="width:777px; height:645px;"></iframe>										
                     <a id="close-reveal-modal" class="close-reveal-modal"></a>
                </div>
                <a class="eachOv-pdf" href="index.php?option=com_ecommerce&task=exportPdf&order_id=<?php echo $order->order_id;?>">Download</a>
                <a class="eachOv-mail" href="index.php?option=com_ecommerce&task=sendMyEmail&order_id=<?php echo $order->order_id;?>">Mail</a>
            </div>					
        </div>
        <?php }?>
    </div>			
</div>